#ifndef SEND_NOTIFICATION_DIALOG_H
#define SEND_NOTIFICATION_DIALOG_H

#include <QDialog>
#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QList>
#include <QString>
#include "ui_sendnotificationdialog.h"

class SendNotificationDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SendNotificationDialog(const QString& senderUsername, QWidget *parent = nullptr);
    ~SendNotificationDialog();

private slots:
    void on_SendBtn_clicked();
    void on_TypeComboBox_currentIndexChanged(int index);

private:
    Ui::sendnotificationdialog *ui;
    QString m_senderUsername;

    // Send notification methods
    bool sendSystemAnnouncement(const QString& title, const QString& content);
    bool sendPersonalNotification(const QString& receiver, const QString& content);

    // Helper methods
    QStringList getAllUsernames();
    QString getNotificationType();
    bool isValidUsername(const QString& username);
};

#endif // SEND_NOTIFICATION_DIALOG_H
